package com.yuan.servicefeign.controller;

import com.yuan.servicefeign.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description:
 * @Author yuan
 * @Date 2020/8/4 
 * @Version V1.0
 **/

@RestController
public class HelloController {


    @Autowired
    private HelloService helloService;


    @GetMapping(value = "feign")
    public String hello(){
        return "this is feign server<br/>" + helloService.hello("") ;
    }

    @GetMapping(value = "info")
    public String info(@RequestParam String name){
        return "this is feign server<br/>" + helloService.info(name) ;
    }

}
